﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Meqs.Entity
{
    [Serializable]
    public class EvalRate
    {
        private int _rID;
        private int _eiID;
        private int _rate;

        public EvalRate()
        {
        }

        public EvalRate(int rID, int eiID, int rate)
        {
            _rID = rID;
            _eiID = eiID;
            _rate = rate;
        }

        public int RID
        {
            get { return _rID; }
            set { _rID = value; }
        }

        public int EiID
        {
            get { return _eiID; }
            set { _eiID = value; }
        }

        public int Rate
        {
            get { return _rate; }
            set { _rate = value; }
        }

        public bool Equals(EvalRate other)
        {
            if (ReferenceEquals(null, other)) return false;
            if (ReferenceEquals(this, other)) return true;
            return other._rID == _rID;
        }

        public override bool Equals(object obj)
        {
            if (ReferenceEquals(null, obj)) return false;
            if (ReferenceEquals(this, obj)) return true;
            if (obj.GetType() != typeof (EvalRate)) return false;
            return Equals((EvalRate) obj);
        }

        public override int GetHashCode()
        {
            return _rID;
        }
    }
}
